import dayjs from 'dayjs'
import relativeTime from 'dayjs/plugin/relativeTime'
import 'dayjs/locale/zh-cn'
dayjs.locale('zh-cn')
dayjs.extend(relativeTime)
// 相对时间====================
export const getRelativeTime = (val) => {
  return dayjs(val).fromNow()
}
export const getFormatTime = (val) => {
  return dayjs(val).format('YYYY-MM-DD HH:mm:ss')
}
